package jtk.project4.fleet.screen.customerManagementController;

/*
* Author : Rio Dermawan 
* Date Created : 1-April-2011
* Date Modified : 6-April-2011
* Version : 1.1
* */


import java.awt.FlowLayout;

import jtk.project4.fleet.field.CustomerManagementField;


import nl.coderight.jazz.form.FormHeader;
import nl.coderight.jazz.form.FormView;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.button.PushButton;
	
public class CustomerManagementView extends FormView {
	private PushButton closeButton;

	@Override
	protected void init() {
		createFields();
		createLayout();	
		
	}

	private GroupControl createButtons() {
		GroupControl buttons = new GroupControl();
		buttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
		buttons.addField(closeButton);
		return buttons;
	}
	
	private GroupControl createForm() {
		GroupControl form = new GroupControl();
		form.addField(new CustomerManagementField("Customer Management"), NORTH);
		form.addField(createButtons(), SOUTH);		
		return form;
	}
	
	private void createLayout() {
		addField(createForm());
	}
	
	private void createFields(){
		closeButton = new PushButton("closeAction");
	}
}
